<%@ page import="com.pojo.Person" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.HashMap" %>
<%@ page import="java.util.Map" %>
<%@ page import="java.util.Arrays" %>
<%--
  Created by IntelliJ IDEA.
  User: ZhuoWen
  Date: 2022/4/24
  Time: 9:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <%
        Person person = new Person();
        person.setName("张三");
        person.setPhones(new String[]{"13456465464","18000000000"});
        List<String> cities=new ArrayList<String>();
        cities.add("北京");
        cities.add("上海");
        cities.add("广州");
        person.setCities(cities);

        Map<String,Object> map = new HashMap<>();
        map.put("key1","value1");
        map.put("key2","value2");
        map.put("key3","value3");
        person.setMap(map);

        pageContext.setAttribute("person",person);
    %>
    输出person：${person}<br>
    输出person的name属性：${person.name}<br>
    输出person的phones数组属性值：${Arrays.toString(person.phones)}<br>
    输出person的cities集合中的属性值：${person.cities}<br>
    输出person的map集合：${person.map}<br>
    输出person的map集合中某个key的值：${person.map.key1}<br>
</body>
</html>
